<?php
/**
 * Created by PhpStorm.
 * User: Timor~Home
 * Date: 2018/5/11
 * Time: 10:00
 */

namespace app\home\controller;
use think\Controller;
use think\Db;
use think\View;
use app\home\model\sdgl as MBn;
class Shoudian extends Controller
{
    public  function  shoudian(){


        $time=Db::query('select time from `xel_sdgl` ');
        $data=Db::query('select data from `xel_sdgl` ');
        $time2=Db::query('select time from `xel_sdgl2` ');
        $data2=Db::query('select data from `xel_sdgl2` ');
        $times=array();
        $datas=array();
        $times2=array();
        $datas2=array();
        foreach ($time as $k=>$v){
            array_push($times,$v["time"]);
        }
        foreach ($data as $k=>$v){
            array_push($datas,$v["data"]);
        }
        foreach ($time2 as $k=>$v){
            array_push($times2,$v["time"]);
        }
        foreach ($data2 as $k=>$v){
            array_push($datas2,$v["data"]);
        }
        $this->assign("times",$times);
        $this->assign("datas",$datas);
        $this->assign("times2",$times2);
        $this->assign("datas2",$datas2);


        return view('admin-sdgl');
    }
}